package Flickr::API::Photo;

our $VERSION = 0.01;

sub new {
	my ($class, $id, $args) = @_;
	
	my $self = {
		id => $id,
		%{$args},
	};
		
	return bless $self, $class;
}

sub get_img_url {
	my $self = shift;
	my $type = shift;

	my $type_suffix = $type ? "_$type" : "";

	my $id			= $self->{id};
	my $farm_id		= $self->{farm};
	my $server_id	= $self->{server};
	my $secret		= $self->{secret};

	return "http://farm${farm_id}.static.flickr.com/${server_id}/${id}_${secret}${type_suffix}.jpg"
}

sub get_username {
	my $self = shift;
	return $self->{username};
}

sub get_id {
	my $self = shift;
	return $self->{id};
}

1;
